<template>
	<view>
		<comp-pageMenu :routes="routes"></comp-pageMenu>
	</view>
</template>

<script setup>
	import usePermissionStore from '@/store/modules/permission'
	import useUserStore from '@/store/modules/user'
	const isAdmin = computed(() => {
		return useUserStore().roles.includes('admin')
	})
	const routes = computed(() => {
		return isAdmin.value ? usePermissionStore().sidebarRouters : usePermissionStore().routes;
	})
</script>

<style lang="scss">
	/* #ifndef APP-NVUE */
	page {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: #fff;
		min-height: 100%;
		height: auto;
	}

	view {
		font-size: 14px;
		line-height: inherit;
	}

	/* #endif */
</style>